﻿using Model.Response;

namespace Helper
{
    public class ApiResultHelper
    {
        public static ApiResult Success(object result)
        {
            return new ApiResult()
            {
                IsSuccess = true,
                Result = result,
                Msg = "操作成功"
            };
        }

        public static ApiResult Error(string msg)
        {
            return new ApiResult()
            {
                IsSuccess = false,
                Result = null,
                Msg = msg
            };
        }
    }
}